<template>
  <v-chart ref="chart" class="chart" :option="option" />
</template>

<script>
export default {
  name: 'LineChart',
  props: ['rData'],
  data() {
    return {
      option: {
        tooltip: {
          trigger: 'item'
        },
        xAxis: {
          type: 'category',
          data: ['北京市', '天津市', '重庆市', '昆明市', '太原市', '西安市', '成都市', '郑州市', '武汉市', '南昌市'],
          axisLine: {
            // show: false
          }
        },
        yAxis: {
          type: 'value',
          name: '/天',
          nameTextStyle: {
            padding: [0, 0, 0, -30]
          },
          nameGap: 20
        },
        series: [{
          data: [120, 200, 150, 80, 70, 110, 130, 70, 110, 130],
          type: 'bar',
          itemStyle: {
            color: '#007AFF'
          },
          lineStyle: {
            width: 12
          }
        }]
      }
    }
  },
  methods: {
    resize() {
      this.$refs['chart'].resize()
    }
  }
}
</script>

<style>

</style>
